package com.xlh.virtualization.service;


import com.xlh.virtualization.po.JudgeSavePO;
import com.xlh.virtualization.vo.JudgeInfoVO;
import com.xlh.virtualization.vo.JudgeVO;
import org.springframework.jdbc.core.JdbcTemplate;

import java.util.List;
import java.util.Map;

/**
 * 虚拟化容器操作 Service
 *
 * @author cheer
 */
public interface ExperimentJudgeService {

    void saveJudge(JudgeSavePO judgeSavePO);

    void runJudge(Integer type, Long stepId, Long containerId);

    JudgeInfoVO existsJudge(Integer type, Long contextId);

    JudgeVO getJudge(Integer type, Long contextId);

    void delete(Integer type, List<Long> contextIds);

    void trueDelete(Integer type, List<Long> contextIds);

    void copy(Integer type, Long sourceStepId, Long targetStepId);

    /**
     * @param jdbcTemplate
     * @param taskIdMap 非多步骤的章节，传源数据库与当前数据库的任务Id映射
     * @param stepIdMap 多步骤的章节 传源数据库与当前数据库的步骤Id映射
     */
    void transport(JdbcTemplate jdbcTemplate, Map<Long, Long> taskIdMap, Map<Long, Long> stepIdMap);
}
